This invention relates to an apparatus and a method for automatic color correction and a recording medium storing a control program therefor and, in particular, to a color correction technique for a color image in a color image processing apparatus, such as a digital still camera, a scanner, a display, and a printer, and in color image processing software.
In color reproduction of a color image, it is important to realize not only exact color reproduction among color image processing apparatuses but also favorable color reproduction favorable to human beings. Natural matters such as the flesh or skin color, the blue sky, and the green vegetation tend to attract attention of human beings and therefore require favorable color reproduction.
Particularly for the skin color, proposal has been made of various skin color correction techniques. For example, Japanese Unexamined Patent Publication (JP-A) No. H08-79549 discloses the technique of improving the reproducibility of the skin color. In the disclosed technique, a high frequency component of a spatial frequency is eliminated for a skin color region to lessen the granular texture and to prevent gradation or color missing at a highlighted portion.
Japanese Unexamined Patent Publication (JP-A) No. H11-17969 discloses the technique of correcting an unfavorable skin color deviated from a favorable skincolor range into a favorable skin color. In this technique, an input image is displayed on a color CRT (Cathode Ray Tube). As an object color to be corrected, the unfavorable skin color such as a darkened skin color or a greenish skin color is selected by a pointing device. The hue of a target picture element corresponding to the object color and the hue of the neighborhood are converted into a desired hue.
Japanese Unexamined Patent Publication (JP-A) No. H06-133329 discloses the technique of correcting color deviation. Specifically, local color deviation is detected for a particular color category, not only the skin color, and converted into a representative color of the particular color category.
Japanese Unexamined Patent Publication (JP-A) No. H06-121159 discloses the color correction technique taking into account memory colors memorized by human beings for color categories such as the skin color, the sky, and the green vegetation.
On the other hand, Japanese Unexamined Patent Publication (JP-A) No. H10-1198795 discloses the color correction technique of arbitrarily selecting a specific hue as an object hue to be corrected and defining a characteristic degree representative of the distance between the specific hue and the hue of the target picture element so that the specific hue alone is subjected to color correction.
In the conventional color correction technique disclosed in JP-A H11-17969, a dialog with a user is executed by the use of a graphical user interface (GUI).
By the use of the technique, it is possible to manually select the representative color in an object area to be corrected and a color correction parameter. This allows flexible and excellent color correction. However, in order to process a large amount of image data in a short time, this technique is inappropriate. This is because the processing time and the labor required in the processing forms a bottleneck and the result of correction would fluctuate in dependence upon the skill of an operator.
In order to avoid the fluctuation of the result of correction due to the difference in skill of the operator and the bottleneck by the processing time, color correction of a color image must be automatically carried out without requiring the user's operation. In the above-mentioned technique disclosed in JP-A H06-133329, a designated hue region is detected and converted into a representative constant color. However, the color of the natural matter such as the skin color, the blue sky, or the green vegetation is not constant. Therefore, natural color reproduction can not be =achieved unless a resultant color after conversion is given a certain degree of fluctuation.
In the above-mentioned technique disclosed in JP-A H06-121159, a single predetermined parameter is used for each object, e.g., the natural matter such as the skin color, the blue sky, and the green vegetation. However, the natural matter such as the skin color, the blue sky, or the green vegetation has a wide color distribution under the influence of characteristics of various input apparatuses and various image pickup environments. For color correction of such object having a wide color distribution, it is necessary to more precisely select optimum correction parameters in dependence upon the hue, the saturation (shade), and the brightness (value) of the color of the object detected from an input image. Otherwise, excellent color reproduction is impossible.
In JP-A H10-198795, proposal is made of the manual color correction by use of the GUI to designate the object color and the automatic color correction exclusively for the skin color. In the automatic color correction, the skin color region is detected by the use of RGB threshold values or YCbCr threshold values. However, if this technique is applied to images picked up under various lighting environments or backgrounds, the accuracy in detection of the skin color region is insufficient as far as the RGB threshold values or the YCbCr threshold values alone are used.
In JP-A H06-121159, the object to be corrected is detected from the input image by the use of the information of an area of the object region determined from threshold values for the hue, the saturation, and the brightness, like in JP-A H10-198795. Such information is given as a simple histogram. However, due to the similar reason, the accuracy in detection of, for example, the skin color is insufficient.